<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/page/inc/taglib.jsp"%>
<div class="pageHeader">
	<form id="pagerForm" onsubmit="return navTabSearch(this);" action="${pageContext.request.contextPath}/merchantSetting/merchantAsset/list" method="post">
		<!-- 分页表单参数 -->
		<%@include file="/WEB-INF/page/inc/pageForm.jsp"%>
		<!-- 需要排序的字段 -->
		<input type="hidden" name="orderField" value="${requestScope.dwzPageBean.countResultMap.orderField}" />
		<!-- 正序倒序 -->
		<input type="hidden" name="orderDirection" value="${requestScope.dwzPageBean.countResultMap.orderDirection}" />
		<div class="searchBar">
			<ul class="searchContent">
				<li><label style="width: 36px;">分组：</label> <select class="combox" name="commonTypeId" class="required">
						<option value="">全部</option>
						<c:forEach items="${requestScope.merchantCommonTypes }" var="merchantCommonType">
							<option value="${merchantCommonType.commonTypeId }" ${requestScope.dwzPageBean.countResultMap.commonTypeId ==merchantCommonType.commonTypeId ? 'selected' :'' }>${merchantCommonType.typeName }</option>
						</c:forEach>
				</select></li>

			</ul>

			<div class="subBar">
				<ul>
					<li>
						<div class="buttonActive">
							<div class="buttonContent">
								<button type="submit">查询</button>
							</div>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<shiro:hasPermission name="/merchantSetting/merchantAsset/toInsert">
				<li><a class="add" href="${pageContext.request.contextPath}/merchantSetting/merchantAsset/toInsert" rel="insert" target="dialog" width="820" height="460" mask="true"><span>添加</span></a></li>
			</shiro:hasPermission>
			<shiro:hasPermission name="/merchantSetting/merchantAsset/delete">
				<li><a class="delete" href="${pageContext.request.contextPath}/merchantSetting/merchantAsset/delete" rel="id" target="selectedTodo" title="确定要删除吗？" warn="请最小选择一条记录" mask="true"><span>批量删除</span></a></li>
			</shiro:hasPermission>
		</ul>
	</div>
	<table class="list" targetType="navTab" asc="asc" desc="desc" width="100%" layoutH="116">
		<thead>
			<tr>
				<th width="22"><input type="checkbox" group="id" class="checkboxCtrl"></th>
				<th orderField="common_type_id" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'common_type_id'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>资源分组</th>
				<th orderField="asset_url" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'asset_url'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>图片url</th>
				<th orderField="pic_name" <c:if test="${requestScope.dwzPageBean.countResultMap.orderField == 'pic_name'}">class="${requestScope.dwzPageBean.countResultMap.orderDirection}"</c:if>>图片名称</th>
				<th width="180">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:if test="${requestScope.dwzPageBean != null &&  requestScope.dwzPageBean.recordList != null }">
				<c:forEach var="record" items="${requestScope.dwzPageBean.recordList}" varStatus="status">
					<tr ondblclick="openDetails(this)" target="dialog" href="${pageContext.request.contextPath}/merchantSetting/merchantAsset/toUpdate?id=${record.merchantAssetId}" title="编辑">
						<td><input name="id" value="${record.merchantAssetId}" type="checkbox"></td>
						<td>${record.tname}</td>
						<td><img width="200" height="200" alt="${record.picName}" src="${pageContext.request.contextPath}${record.assetUrl}"></td>
						<td>${record.picName}</td>
						<td>
							<shiro:hasPermission name="/merchantSetting/merchantAsset/toUpdate">
								<a title="编辑" target="dialog" width="820" height="460" href="${pageContext.request.contextPath}/merchantSetting/merchantAsset/toUpdate?id=${record.merchantAssetId}" class="editBtn" mask="true" style="color: #000000;"><span>编辑图片名称</span></a>
							</shiro:hasPermission>
							<shiro:hasPermission name="/merchantSetting/merchantAsset/delete">
								<a title="确定要删除吗？" mask="true" target="ajaxTodo" href="${pageContext.request.contextPath}/merchantSetting/merchantAsset/delete?id=${record.merchantAssetId}" class="deleteBtn" mask="true" style="color: #000000;"><span>删除</span></a>
							</shiro:hasPermission>
						</td>
					</tr>
				</c:forEach>
			</c:if>
		</tbody>
	</table>
	<!-- 分页条 -->
	<%@include file="/WEB-INF/page/inc/pageBar.jsp"%>
</div>